<!--
 * @Author: Qimu
 * @Date: 2020-09-03 09:15:09
 * @LastEditors: Qimu
 * @LastEditTime: 2020-09-04 12:11:13
 * @Description: file content
 * @FilePath: \vue-gis-zt\src\components\Pagination\Pagination.vue
-->
<template>
  <div class="Pagination">
    <el-pagination
      background
      @current-change="pageChange"
      :current-page.sync="pages.current"
      :page-size="pages.pageSize"
      layout="prev, pager, next, total, jumper"
      :total="pages.total"
    ></el-pagination>
  </div>
</template>

<script>
export default {
  props: {
    //分页信息
    pages: {
      type: Object,
      required: true,
    },
  },
  methods: {
    pageChange(currentPage) {
      //向父组件TransmissionLine.vue页面传值,当前页面数
      this.$emit('pageChange', currentPage)
    },
  },
}
</script>
